package GaoYuXuan.Homework0714;

/**
 * @author 盖
 * @version 1.0
 * @since 2022-07-14 19:49:49
 */
public class Beauty implements Cloneable{
    private String name;
    private Cat cat;

    public Beauty(String name,Cat cat){
        this.name = name;
        this.cat = cat;
    }

    public Beauty(){

    }

    public String getName(){
        return name;
    }

    public Cat getCat(){
        return cat;
    }

    public void setName(){
        this.name = name;
    }

    public void setCat(){
        this.cat = cat;
    }

    public static void main(String[] args) throws CloneNotSupportedException {
        Cat c = new Cat("Tracy");
        Beauty b = new Beauty("G", c);
        Beauty a = (Beauty)b.clone();
        System.out.println(a == b);
        System.out.println(a.getCat() == b.getCat());
    }
}